Fix typing contract for max_concurrency in Datalake client#45631
Merged
nateprewitt merged 2 commits intoAzure:mainfrom Mar 11, 2026
Merged
Fix typing contract for max_concurrency in Datalake client#45631nateprewitt merged 2 commits intoAzure:mainfrom
nateprewitt merged 2 commits intoAzure:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the effort to align the runtime behavior of azure-storage-file-datalake with its typing contract by ensuring max_concurrency=None is treated as “use SDK default” instead of raising TypeError, and adds coverage for that behavior.
Changes:
- Introduces
DEFAULT_MAX_CONCURRENCYand applies it whenmax_concurrencyis not provided. - Updates shared upload helpers (sync/async) to tolerate
max_concurrency=None. - Adds sync and async tests covering
max_concurrency=Nonefor upload and download, and updates the assets tag.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/storage/azure-storage-file-datalake/tests/test_file_async.py | Adds async tests verifying max_concurrency=None doesn’t error for upload/download. |
| sdk/storage/azure-storage-file-datalake/tests/test_file.py | Adds sync tests verifying max_concurrency=None doesn’t error for upload/download. |
| sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads_async.py | Defaults max_concurrency to DEFAULT_MAX_CONCURRENCY in async upload paths. |
| sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py | Defaults max_concurrency to DEFAULT_MAX_CONCURRENCY in sync upload paths. |
| sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/constants.py | Adds DEFAULT_MAX_CONCURRENCY = 1. |
| sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client_helpers.py | Normalizes max_concurrency from kwargs when building upload options. |
| sdk/storage/azure-storage-file-datalake/assets.json | Updates recorded test assets tag. |
...age/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client_helpers.py
Outdated
Show resolved
Hide resolved
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py
Outdated
Show resolved
Hide resolved
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py
Outdated
Show resolved
Hide resolved
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads_async.py
Outdated
Show resolved
Hide resolved
sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads_async.py
Outdated
Show resolved
Hide resolved
jalauzon-msft
approved these changes
Mar 10, 2026
...age/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client_helpers.py
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is a continuation of #45598. PR 2/3 fixing typing signatures for the datalake client.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines